﻿using System.Collections.Generic;
using Stimulus360.Models.Data.CustomTypes;

namespace Stimulus360.Repositories.Interfaces
{
    /// <summary>
    ///     This interface interacts with the Stimulus DB and the CMS DB to calculate
    ///     various data used for analytics
    /// </summary>
    public interface IAnalyticsRepository
    {

        /// <summary>
        ///     Method to get the Budget, Amount spent and jobs created for the top N 
        ///     Investment categories
        /// </summary>
        /// <param name="top">
        ///     Number of top categories to be considered
        /// </param>
        /// <returns>
        ///     The Budget, Amount spent and jobs created for the top N 
        ///     Investment categories
        /// </returns>
        ICollection<BudgetSpendSummary> GetTopNBudgetSpendSummaries(int top);

        /// <summary>
        ///     Count of ideas created during the current financial year
        /// </summary>
        /// <returns>
        ///     Quarter wise count of ideas created in the current financial year.
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        ICollection<IdeaTrend> GetIdeationTrend();

        /// <summary>
        ///     Count of projects Completed/Postponed/InProgress during the current financial year
        /// </summary>
        /// <returns>
        ///     Quarterwise count of projects Completed/Postponed/InProgress during the current financial year
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        ICollection<ProjectTrend> GetProjectTrend();

        /// <summary>
        ///     Method to get the sum of budgets allocated to all the Investment Categories for the 
        ///     current financial year
        /// </summary>
        /// <returns>
        ///     The sum of budgets allocated to all the Investment Categories for the 
        ///     current financial year
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        string GetStimulusBudget();

        /// <summary>
        ///     Method to get the amount spent till Date by all the Investment Categories for the 
        ///     current financial year
        /// </summary>
        /// <returns>
        ///     The amount spent till Date by all the Investment Categories for the 
        ///     current financial year
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        string GetBudgetSpent();

        /// <summary>
        ///     Method to get the sum of jobs created across all investment categories for the current financial year
        /// </summary>
        /// <returns>
        ///     The sum of jobs created across all investment categories for the current financial year
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        string GetJobsCreated();

        /// <summary>
        ///     Method infers and returns the set of active users in the system
        /// </summary>
        /// <returns>
        ///     Set of active users in the system
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        ICollection<string> GetActiveUsers();

        /// <summary>
        ///     Method to get the number of completed projects in the system
        /// </summary>
        /// <returns>
        ///     Number of completed projects in the system
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        int GetProjectExecutedCount();

        /// <summary>
        ///     Method returns total user count
        /// </summary>
        /// <returns>
        ///     The total user count
        /// </returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
            Justification = "Method use is appropriate considering complexity and logic http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1")]
        int GetAllUserCount();
    }
}
